fixed compilation under windows

- crashes sometimes for no obvious reason when loading fonts
This commit is contained in:
2011-05-04 18:33:44 +02:00
parent b5c4ef359f
commit c2ca0a1a4d
18 changed files with 100 additions and 41 deletions
+13 -3
View File
@@ -89,8 +89,11 @@ namespace OGLFT {
FT_Face ft_face;
FT_Error error = FT_New_Face( Library::instance(), filename, 0, &ft_face );
assert (0);
std::cerr << "FreeType error code: " << error << std::endl;
if ( error != 0 ) {
std::cerr << "FreeType error code: " << error << std::endl;
valid_ = false;
return;
}
@@ -178,8 +181,10 @@ namespace OGLFT {
FT_Error error = FT_New_Face( Library::instance(), filename, 0, &ft_face );
if ( error != 0 )
return false;
if ( error != 0 ) {
std::cerr << "FreeType error code: " << error << std::endl;
return false;
}
faces_.push_back( FaceData( ft_face ) );
@@ -406,7 +411,10 @@ namespace OGLFT {
FT_Error error = FT_Load_Glyph( faces_[f].face_, glyph_index,
FT_LOAD_DEFAULT );
if ( error != 0 ) return;
if ( error != 0 ) {
std::cerr << "FreeType error code: " << error << std::endl;
return;
}
rotation_reference_glyph_ = glyph_index;
@@ -1348,6 +1356,8 @@ namespace OGLFT {
{
if ( !isValid() ) return;
std::cerr << "Raster is valid!" << std::endl;
init();
}
@@ -619,7 +619,7 @@ namespace OGLFT {
* \param blue the blue component of the background color.
* \param alpha the alpha component of the background color.
*/
void setBackgroundColor ( GLfloat red = 1.0,
OGLFT_API void setBackgroundColor ( GLfloat red = 1.0,
GLfloat green = 1.0,
GLfloat blue = 1.0,
GLfloat alpha = 0.0 );
@@ -631,7 +631,7 @@ namespace OGLFT {
* \param background_color an array of 4 values corresponding to the
* red, green, blue and alpha components of the background color.
*/
void setBackgroundColor ( const GLfloat background_color[4] );
OGLFT_API void setBackgroundColor ( const GLfloat background_color[4] );
#ifndef OGLFT_NO_QT
/*!
* This is the nominal background color of the glyphs. A lot of other things