mirror of
https://github.com/glest/glest-source.git
synced 2025-08-22 07:52:51 +02:00
- corrections for y co-ord placement of font
This commit is contained in:
@@ -79,7 +79,7 @@ Text * FontMetrics::getTextHandler() {
|
||||
|
||||
float FontMetrics::getTextWidth(const string &str) {
|
||||
if(textHandler != NULL) {
|
||||
return textHandler->Advance(str.c_str());
|
||||
return (textHandler->Advance(str.c_str()) * Font::scaleFontValue);
|
||||
}
|
||||
else {
|
||||
float width= 0.f;
|
||||
@@ -103,7 +103,7 @@ float FontMetrics::getTextWidth(const string &str) {
|
||||
|
||||
float FontMetrics::getHeight() const {
|
||||
if(textHandler != NULL) {
|
||||
return textHandler->LineHeight(" ");
|
||||
return (textHandler->LineHeight(" ") * Font::scaleFontValue);
|
||||
}
|
||||
else {
|
||||
return height;
|
||||
|
@@ -470,7 +470,7 @@ void TextRenderer3DGl::internalRender(const string &text, float x, float y, boo
|
||||
translatePos.x = x - (font->getTextHandler()->Advance(renderText.c_str()) / 2.f);
|
||||
//assertGl();
|
||||
//translatePos.y = y - (font->getTextHandler()->LineHeight(text.c_str()) / font->getYOffsetFactor());
|
||||
translatePos.y = y - (font->getTextHandler()->LineHeight(renderText.c_str()) / 2.f);
|
||||
translatePos.y = y - ((font->getTextHandler()->LineHeight(renderText.c_str()) * Font::scaleFontValue) / 2.f);
|
||||
//assertGl();
|
||||
|
||||
translatePos.z = 0;
|
||||
|
Reference in New Issue
Block a user