Moved FT_Done_Glyph from FT*Glyph
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
diff --git a/src/FTGLBitmapFont.cpp b/src/FTGLBitmapFont.cpp
index 6e39292..1658da0 100755
--- a/src/FTGLBitmapFont.cpp
+++ b/src/FTGLBitmapFont.cpp
@@ -20,6 +20,8 @@ FTGlyph* FTGLBitmapFont::MakeGlyph( unsigned int g)
if( ftGlyph)
{
FTBitmapGlyph* tempGlyph = new FTBitmapGlyph( *ftGlyph);
+ FT_Done_Glyph( *ftGlyph );
+
return tempGlyph;
}
diff --git a/src/FTGLExtrdFont.cpp b/src/FTGLExtrdFont.cpp
index 67d26f3..e712aab 100644
--- a/src/FTGLExtrdFont.cpp
+++ b/src/FTGLExtrdFont.cpp
@@ -21,6 +21,7 @@ FTGlyph* FTGLExtrdFont::MakeGlyph( unsigned int g)
if( ftGlyph)
{
FTExtrdGlyph* tempGlyph = new FTExtrdGlyph( *ftGlyph, depth);
+ FT_Done_Glyph( *ftGlyph );
return tempGlyph;
}
diff --git a/src/FTGLOutlineFont.cpp b/src/FTGLOutlineFont.cpp
index f733df3..d7364b9 100755
--- a/src/FTGLOutlineFont.cpp
+++ b/src/FTGLOutlineFont.cpp
@@ -20,6 +20,7 @@ FTGlyph* FTGLOutlineFont::MakeGlyph( unsigned int g)
if( ftGlyph)
{
FTOutlineGlyph* tempGlyph = new FTOutlineGlyph( *ftGlyph);
+ FT_Done_Glyph( *ftGlyph );
return tempGlyph;
}
diff --git a/src/FTGLPixmapFont.cpp b/src/FTGLPixmapFont.cpp
index ebecc8a..b514da3 100755
--- a/src/FTGLPixmapFont.cpp
+++ b/src/FTGLPixmapFont.cpp
@@ -20,6 +20,7 @@ FTGlyph* FTGLPixmapFont::MakeGlyph( unsigned int g)
if( ftGlyph)
{
FTPixmapGlyph* tempGlyph = new FTPixmapGlyph( *ftGlyph);
+ FT_Done_Glyph( *ftGlyph );
return tempGlyph;
}
diff --git a/src/FTGLPolygonFont.cpp b/src/FTGLPolygonFont.cpp
index 31fd9e4..adaf152 100755
--- a/src/FTGLPolygonFont.cpp
+++ b/src/FTGLPolygonFont.cpp
@@ -20,6 +20,7 @@ FTGlyph* FTGLPolygonFont::MakeGlyph( unsigned int g)
if( ftGlyph)
{
FTPolyGlyph* tempGlyph = new FTPolyGlyph( *ftGlyph);
+ FT_Done_Glyph( *ftGlyph );
return tempGlyph;
}
diff --git a/src/FTGLTextureFont.cpp b/src/FTGLTextureFont.cpp
index af2df9e..df30c2d 100755
--- a/src/FTGLTextureFont.cpp
+++ b/src/FTGLTextureFont.cpp
@@ -83,6 +83,7 @@ FTGlyph* FTGLTextureFont::MakeGlyph( unsigned int g)
xOffset += tempGlyph->BBox().x2 - tempGlyph->BBox().x1 + padding;
--remGlyphs;
+ FT_Done_Glyph( *ftGlyph );
return tempGlyph;
}