fixed compilation under windows
- crashes sometimes for no obvious reason when loading fonts
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -86,7 +86,12 @@
|
||||
* made).
|
||||
*/
|
||||
#if !defined(BYTE_ORDER) || (BYTE_ORDER != LITTLE_ENDIAN && BYTE_ORDER != BIG_ENDIAN)
|
||||
#error Define BYTE_ORDER to be equal to either LITTLE_ENDIAN or BIG_ENDIAN
|
||||
#ifdef WIN32
|
||||
#define LITTLE_ENDIAN 12345
|
||||
#define BYTE_ORDER LITTLE_ENDIAN
|
||||
#else
|
||||
#error Define BYTE_ORDER to be equal to either LITTLE_ENDIAN or BIG_ENDIAN
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
||||
@@ -71,7 +71,7 @@ extern "C" {
|
||||
* uintXX_t (from inttypes.h), you may need to define things by hand
|
||||
* for your system:
|
||||
*/
|
||||
#if 0
|
||||
#if 1
|
||||
typedef unsigned char u_int8_t; /* 1-byte (8-bits) */
|
||||
typedef unsigned int u_int32_t; /* 4-bytes (32-bits) */
|
||||
typedef unsigned long long u_int64_t; /* 8-bytes (64-bits) */
|
||||
|
||||
Reference in New Issue
Block a user