corrected font alingment when using combination of newline and tabs

This commit is contained in:
Mark Vejvoda
2011-11-28 15:59:38 +00:00
parent c16cdad134
commit 30972bcddb
2 changed files with 14 additions and 11 deletions

View File

@@ -539,6 +539,7 @@ void TextRenderer3DGl::internalRender(const string &text, float x, float y, boo
//glTranslatef(translatePos.x + scaleWidthX, translatePos.y, translatePos.z);
glTranslatef(translatePos.x, translatePos.y, translatePos.z);
Vec3f translatePosOriginal = translatePos;;
//assertGl();
//glScalef(scaleX, scaleY, scaleZ);
@@ -611,7 +612,7 @@ void TextRenderer3DGl::internalRender(const string &text, float x, float y, boo
//printf("Trying to render newline [%s] i = %d yLineValue = %f font->getTextHandler()->LineHeight(parts[i].c_str()) = %f\n",renderText.c_str(),i,yLineValue,font->getTextHandler()->LineHeight(parts[i].c_str()));
translatePos= Vec3f(translatePos.x, translatePos.y - yLineValue, translatePos.z);
translatePos= Vec3f(translatePosOriginal.x, translatePos.y - yLineValue, translatePos.z);
needsRecursiveRender = true;
}
break;