diff --git a/source/glest_game/graphics/renderer.cpp b/source/glest_game/graphics/renderer.cpp index c62e2598..febef064 100644 --- a/source/glest_game/graphics/renderer.cpp +++ b/source/glest_game/graphics/renderer.cpp @@ -1899,11 +1899,7 @@ Vec2f Renderer::getCentered3DPos(const string &text, Font3D *font, Vec2f &pos, i else { pos.y += (float)(((float)h) / 2.0); float heightGap = (float)(((float)h - lineHeight) / 2.0); -#ifdef USE_STREFLOP - pos.y -= streflop::ceil(heightGap); -#else - pos.y -= ceil(heightGap); -#endif + pos.y -= heightGap; //printf("h = %d lineHeight = %f heightGap = %f\n",h,lineHeight,heightGap); diff --git a/source/shared_lib/sources/graphics/gl/font_text_freetypegl.cpp b/source/shared_lib/sources/graphics/gl/font_text_freetypegl.cpp index ca29e787..7a78e86c 100644 --- a/source/shared_lib/sources/graphics/gl/font_text_freetypegl.cpp +++ b/source/shared_lib/sources/graphics/gl/font_text_freetypegl.cpp @@ -224,7 +224,8 @@ float TextFreetypeGL::LineHeight(const char* str, const int len) { float result = 0; - result = font->height - font->linegap; + //result = font->height - font->linegap; + result = font->ascender - font->descender - font->linegap; //printf("#2 LineHeight [%s] height = %f linegap = %f ascender = %f descender = %f\n",str,font->height,font->linegap,font->ascender,font->descender); //result += (result * Font::scaleFontValue);