* Honour the pen's Z coordinate when rendering glyphs (except the raster ones, where the Z coordinate makes no sense).
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
diff --git a/src/FTGlyph/FTExtrudeGlyph.cpp b/src/FTGlyph/FTExtrudeGlyph.cpp
index a360c0b..02127ab 100644
--- a/src/FTGlyph/FTExtrudeGlyph.cpp
+++ b/src/FTGlyph/FTExtrudeGlyph.cpp
@@ -133,7 +133,7 @@ FTExtrudeGlyphImpl::~FTExtrudeGlyphImpl()
const FTPoint& FTExtrudeGlyphImpl::RenderImpl(const FTPoint& pen,
int renderMode)
{
- glTranslatef(pen.Xf(), pen.Yf(), 0);
+ glTranslatef(pen.Xf(), pen.Yf(), pen.Zf());
if(glList)
{
if(renderMode & FTGL::RENDER_FRONT)
@@ -152,7 +152,7 @@ const FTPoint& FTExtrudeGlyphImpl::RenderImpl(const FTPoint& pen,
if(renderMode & FTGL::RENDER_SIDE)
RenderSide();
}
- glTranslatef(-pen.Xf(), -pen.Yf(), 0);
+ glTranslatef(-pen.Xf(), -pen.Yf(), -pen.Zf());
return advance;
}
diff --git a/src/FTGlyph/FTOutlineGlyph.cpp b/src/FTGlyph/FTOutlineGlyph.cpp
index 9cd3d43..b2c00eb 100644
--- a/src/FTGlyph/FTOutlineGlyph.cpp
+++ b/src/FTGlyph/FTOutlineGlyph.cpp
@@ -113,7 +113,7 @@ FTOutlineGlyphImpl::~FTOutlineGlyphImpl()
const FTPoint& FTOutlineGlyphImpl::RenderImpl(const FTPoint& pen,
int renderMode)
{
- glTranslatef(pen.Xf(), pen.Yf(), 0.0f);
+ glTranslatef(pen.Xf(), pen.Yf(), pen.Zf());
if(glList)
{
glCallList(glList);
@@ -122,7 +122,7 @@ const FTPoint& FTOutlineGlyphImpl::RenderImpl(const FTPoint& pen,
{
DoRender();
}
- glTranslatef(-pen.Xf(), -pen.Yf(), 0.0f);
+ glTranslatef(-pen.Xf(), -pen.Yf(), -pen.Zf());
return advance;
}
diff --git a/src/FTGlyph/FTPolygonGlyph.cpp b/src/FTGlyph/FTPolygonGlyph.cpp
index 46346a2..67927bb 100644
--- a/src/FTGlyph/FTPolygonGlyph.cpp
+++ b/src/FTGlyph/FTPolygonGlyph.cpp
@@ -116,7 +116,7 @@ FTPolygonGlyphImpl::~FTPolygonGlyphImpl()
const FTPoint& FTPolygonGlyphImpl::RenderImpl(const FTPoint& pen,
int renderMode)
{
- glTranslatef(pen.Xf(), pen.Yf(), 0.0f);
+ glTranslatef(pen.Xf(), pen.Yf(), pen.Zf());
if(glList)
{
glCallList(glList);
@@ -125,7 +125,7 @@ const FTPoint& FTPolygonGlyphImpl::RenderImpl(const FTPoint& pen,
{
DoRender();
}
- glTranslatef(-pen.Xf(), -pen.Yf(), 0.0f);
+ glTranslatef(-pen.Xf(), -pen.Yf(), -pen.Zf());
return advance;
}