diff --git a/source/glest_game/graphics/renderer.cpp b/source/glest_game/graphics/renderer.cpp index 4d4244688..e44ccde59 100644 --- a/source/glest_game/graphics/renderer.cpp +++ b/source/glest_game/graphics/renderer.cpp @@ -1450,14 +1450,14 @@ Vec2f Renderer::getCentered3DPos(const string &text, Font3D *font, Vec2f &pos, i if(lineHeight < h) { //pos.y += ((float)h / 2.f); //pos.y -= ((float(h) / 2.f) - (lineHeight / 2.f)); - pos.y += (lineHeight / 2.f) + 2; + pos.y += (lineHeight / 2.f) + FontMetrics::DEFAULT_Y_OFFSET_FACTOR; //pos.y -= h; //printf("Center text [%s] h = %d, lineHeight = %f, pos.y = %f\n",text.c_str(),h,lineHeight,pos.y); //printf("Center text [%s] h = %d, lineHeight = %f, pos.y = %f\n",text.c_str(),h,lineHeight,pos.y); } else { - pos.y += ((float)h / 2.f) - 2; + pos.y += ((float)h / 2.f) - FontMetrics::DEFAULT_Y_OFFSET_FACTOR; } return pos; } diff --git a/source/shared_lib/include/graphics/font.h b/source/shared_lib/include/graphics/font.h index 3e564aba0..c0f7b2086 100644 --- a/source/shared_lib/include/graphics/font.h +++ b/source/shared_lib/include/graphics/font.h @@ -66,6 +66,7 @@ public: static bool forceLegacyFonts; static bool fontIsRightToLeft; static float scaleFontValue; + //static int scaleFontYOffset; public: enum Width { diff --git a/source/shared_lib/sources/graphics/font.cpp b/source/shared_lib/sources/graphics/font.cpp index 52b6e3bfa..64840ff8a 100644 --- a/source/shared_lib/sources/graphics/font.cpp +++ b/source/shared_lib/sources/graphics/font.cpp @@ -36,9 +36,10 @@ int Font::charCount = 256; std::string Font::fontTypeName = "Times New Roman"; bool Font::fontIsMultibyte = false; bool Font::forceLegacyFonts = false; -float FontMetrics::DEFAULT_Y_OFFSET_FACTOR = 8.0f; +float FontMetrics::DEFAULT_Y_OFFSET_FACTOR = 0.0f; bool Font::fontIsRightToLeft = false; -float Font::scaleFontValue = 0.65; +float Font::scaleFontValue = 0.75; +//int Font::scaleFontYOffset = 0; // // =====================================================