diff -ru old/FTGL-2.0.11/src/FTPixmapGlyph.cpp FTGL-2.0.11/src/FTPixmapGlyph.cpp --- old/FTGL-2.0.11/src/FTPixmapGlyph.cpp 2003-09-25 06:55:19.000000000 +0300 +++ FTGL-2.0.11/src/FTPixmapGlyph.cpp 2004-09-17 12:32:26.000000000 +0300 @@ -43,6 +43,21 @@ if( ftglColour[3] == 1.0f) { + if (FT_PIXEL_MODE_MONO == bitmap.pixel_mode) { + // convert the bitmap to gray map + for( int y = 0; y < srcHeight; ++y) + { + for( int x = 0; x < srcWidth; ++x) + { + *dest++ = redComponent; + *dest++ = greenComponent; + *dest++ = blueComponent; + *dest++ = (src[x >> 3] & (128 >> (x & 7))) ? 255 : 0; + } + dest -= destStep; + src += bitmap.pitch; + } + } else { for( int y = 0; y < srcHeight; ++y) { for( int x = 0; x < srcWidth; ++x) @@ -54,9 +69,26 @@ } dest -= destStep; } + } } else { + if (FT_PIXEL_MODE_MONO == bitmap.pixel_mode) { + // convert the bitmap to gray map + for( int y = 0; y < srcHeight; ++y) + { + for( int x = 0; x < srcWidth; ++x) + { + *dest++ = redComponent; + *dest++ = greenComponent; + *dest++ = blueComponent; + *dest++ = (src[x >> 3] & (128 >> (x & 7))) ? + static_cast(ftglColour[3]) : 0; + } + dest -= destStep; + src += bitmap.pitch; + } + } else { for( int y = 0; y < srcHeight; ++y) { for( int x = 0; x < srcWidth; ++x) @@ -68,6 +100,7 @@ } dest -= destStep; } + } } destHeight = srcHeight;