Freetype 2.1 and later align bitmap pitch on boundaries of 2 bytes. It is

therefore necessary to use glPixelStorei(..,UNPACK_..., 2).  There is an
#if() statement that allows the continued use of freetype 2.0 (Rh 7.x), as
well as accomodating newer releases.
This commit is contained in:
Don BURNS
2002-11-23 05:16:47 +00:00
parent 4acee51414
commit 1098a7ded1
2 changed files with 5 additions and 0 deletions

View File

@@ -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;