- bugfix for fonts to remove newline character when calculating / rendering multi-line strings

This commit is contained in:
Mark Vejvoda 2011-06-30 22:10:11 +00:00
parent f5af03f8d7
commit 7b95fac8cc

View File

@ -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);