From 7b95fac8cc2edb51e213245289b0efeb75578357 Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Thu, 30 Jun 2011 22:10:11 +0000 Subject: [PATCH] - bugfix for fonts to remove newline character when calculating / rendering multi-line strings --- source/shared_lib/sources/graphics/gl/text_renderer_gl.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/shared_lib/sources/graphics/gl/text_renderer_gl.cpp b/source/shared_lib/sources/graphics/gl/text_renderer_gl.cpp index 51f9e263c..da92a39a2 100644 --- a/source/shared_lib/sources/graphics/gl/text_renderer_gl.cpp +++ b/source/shared_lib/sources/graphics/gl/text_renderer_gl.cpp @@ -592,6 +592,9 @@ void TextRenderer3DGl::internalRender(const string &text, float x, float y, boo { line++; //assertGl(); + //printf("NEWLINE before [%s]\n",parts[i].c_str()); + parts[i] = parts[i].erase(0); + //printf("NEWLINE after [%s]\n",parts[i].c_str()); float yLineValue = (font->getTextHandler()->LineHeight(parts[i].c_str()) * Font::scaleFontValue); //assertGl(); translatePos= Vec3f(translatePos.x, translatePos.y - yLineValue, translatePos.z);