render() does not draw'invalid' glyphs
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
diff --git a/src/FTPolyGlyph.cpp b/src/FTPolyGlyph.cpp
index 7b4bb15..8e36105 100644
--- a/src/FTPolyGlyph.cpp
+++ b/src/FTPolyGlyph.cpp
@@ -146,9 +146,12 @@ FTPolyGlyph::~FTPolyGlyph()
float FTPolyGlyph::Render( const FT_Vector& pen)
{
- glTranslatef( pen.x, pen.y, 0);
- glCallList( glList);
- glTranslatef( -pen.x, -pen.y, 0);
+ if( glList)
+ {
+ glTranslatef( pen.x, pen.y, 0);
+ glCallList( glList);
+ glTranslatef( -pen.x, -pen.y, 0);
+ }
return advance;
}
diff --git a/src/FTVectorGlyph.cpp b/src/FTVectorGlyph.cpp
index cca2ea1..da2f92f 100755
--- a/src/FTVectorGlyph.cpp
+++ b/src/FTVectorGlyph.cpp
@@ -71,9 +71,12 @@ FTVectorGlyph::~FTVectorGlyph()
float FTVectorGlyph::Render( const FT_Vector& pen)
{
- glTranslatef( pen.x, pen.y, 0);
- glCallList( glList);
- glTranslatef( -pen.x, -pen.y, 0);
+ if( glList)
+ {
+ glTranslatef( pen.x, pen.y, 0);
+ glCallList( glList);
+ glTranslatef( -pen.x, -pen.y, 0);
+ }
return advance;
}