Set the bounding box
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
diff --git a/src/FTPolyGlyph.cpp b/src/FTPolyGlyph.cpp
index 8aad51c..883447f 100644
--- a/src/FTPolyGlyph.cpp
+++ b/src/FTPolyGlyph.cpp
@@ -10,7 +10,9 @@ FTPolyGlyph::FTPolyGlyph( FT_Glyph glyph)
glList(0)
{
if( ft_glyph_format_outline != glyph->format)
- { return;}
+ {
+ return;
+ }
vectoriser = new FTVectoriser( glyph);
@@ -26,16 +28,11 @@ FTPolyGlyph::FTPolyGlyph( FT_Glyph glyph)
}
data = new double[ numPoints * 3];
-
vectoriser->GetMesh( data);
-
- advance = glyph->advance.x >> 16;
-
delete vectoriser;
- glList = glGenLists(1);
int d = 0;
-
+ glList = glGenLists(1);
glNewList( glList, GL_COMPILE);
int BEPairs = data[0];
for( int i = 0; i < BEPairs; ++i)
@@ -57,6 +54,9 @@ FTPolyGlyph::FTPolyGlyph( FT_Glyph glyph)
delete [] data; // FIXME
data = 0;
+ bBox = FTBBox( glyph);
+ advance = glyph->advance.x >> 16;
+
// discard glyph image (bitmap or not)
FT_Done_Glyph( glyph); // Why does this have to be HERE
}