Commit d10af39fcebb168cc258fc1288efaaaf54437c0e

sammy 2010-05-23T00:24:14

Properly handle Render's position argument in FTTextureFont and FTBufferFont. Addresses SF bug #2883801.

diff --git a/src/FTFont/FTBufferFont.cpp b/src/FTFont/FTBufferFont.cpp
index a171c87..4f6560e 100644
--- a/src/FTFont/FTBufferFont.cpp
+++ b/src/FTFont/FTBufferFont.cpp
@@ -311,16 +311,16 @@ inline FTPoint FTBufferFontImpl::RenderI(const T* string, const int len,
         glNormal3f(0.0f, 0.0f, 1.0f);
         glTexCoord2f(0.0f,
                      1.0f / texHeight * (texHeight - height));
-        glVertex2f(low.Xf(), up.Yf());
+        glVertex3f(low.Xf(), up.Yf(), position.Zf());
         glTexCoord2f(0.0f,
                      1.0f);
-        glVertex2f(low.Xf(), low.Yf());
+        glVertex3f(low.Xf(), low.Yf(), position.Zf());
         glTexCoord2f(1.0f / texWidth * width,
                      1.0f);
-        glVertex2f(up.Xf(), low.Yf());
+        glVertex3f(up.Xf(), low.Yf(), position.Zf());
         glTexCoord2f(1.0f / texWidth * width,
                      1.0f / texHeight * (texHeight - height));
-        glVertex2f(up.Xf(), up.Yf());
+        glVertex3f(up.Xf(), up.Yf(), position.Zf());
     glEnd();
 
     glPopClientAttrib();
diff --git a/src/FTGlyph/FTTextureGlyph.cpp b/src/FTGlyph/FTTextureGlyph.cpp
index f1d7725..28189dc 100644
--- a/src/FTGlyph/FTTextureGlyph.cpp
+++ b/src/FTGlyph/FTTextureGlyph.cpp
@@ -178,16 +178,16 @@ const FTPoint& FTTextureGlyphImpl::RenderImpl(const FTPoint& pen,
 
     glBegin(GL_QUADS);
         glTexCoord2f(uv[0].Xf(), uv[0].Yf());
-        glVertex2f(dx, dy);
+        glVertex3f(dx, dy, pen.Zf());
 
         glTexCoord2f(uv[0].Xf(), uv[1].Yf());
-        glVertex2f(dx, dy - destHeight);
+        glVertex3f(dx, dy - destHeight, pen.Zf());
 
         glTexCoord2f(uv[1].Xf(), uv[1].Yf());
-        glVertex2f(dx + destWidth, dy - destHeight);
+        glVertex3f(dx + destWidth, dy - destHeight, pen.Zf());
 
         glTexCoord2f(uv[1].Xf(), uv[0].Yf());
-        glVertex2f(dx + destWidth, dy);
+        glVertex3f(dx + destWidth, dy, pen.Zf());
     glEnd();
 
     return advance;