diff --git a/src/osgText/FTBitmapGlyph.cpp b/src/osgText/FTBitmapGlyph.cpp index 1e9dde778..fbb4f0e7b 100644 --- a/src/osgText/FTBitmapGlyph.cpp +++ b/src/osgText/FTBitmapGlyph.cpp @@ -39,6 +39,7 @@ FTBitmapGlyph::FTBitmapGlyph( FT_Glyph glyph) data = osgNew unsigned char[srcPitch * destHeight]; + // !!!! THIS assumes a positive Pitch value. No allowance for negative pitch for(int y = 0; y < srcHeight; ++y) { --destHeight; diff --git a/src/osgText/FTGLBitmapFont.cpp b/src/osgText/FTGLBitmapFont.cpp index 1f8d1a6eb..5ab3314aa 100644 --- a/src/osgText/FTGLBitmapFont.cpp +++ b/src/osgText/FTGLBitmapFont.cpp @@ -45,7 +45,11 @@ void FTGLBitmapFont::render( const char* string,unsigned int renderContext) glPixelStorei( GL_UNPACK_LSB_FIRST, GL_FALSE); glPixelStorei( GL_UNPACK_ROW_LENGTH, 0); +#if (FREETYPE_MAJOR >= 2) && (FREETYPE_MINOR>=1) + glPixelStorei( GL_UNPACK_ALIGNMENT, 2); +#else glPixelStorei( GL_UNPACK_ALIGNMENT, 1); +#endif FTFont::render( string,renderContext);