From 9135b6155d813a538064a85e4262f505881b4bad Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Sat, 22 Oct 2011 03:13:23 +0000 Subject: [PATCH] fix legacyfont on intro and changed linux default legacy font to arial since helvetica is not working on ubuntu --- mk/linux/glest.ini | 8 ++++---- source/glest_game/main/intro.cpp | 8 +++----- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/mk/linux/glest.ini b/mk/linux/glest.ini index d13f0a95..0fef38f5 100644 --- a/mk/linux/glest.ini +++ b/mk/linux/glest.ini @@ -43,17 +43,17 @@ FogOfWarSmoothing=true FogOfWarSmoothingFrameSkip=3 FontConsoleBaseSize=18 FontConsolePostfix=-*-*-*-*-*-*-* -FontConsolePrefix=-*-helvetica-*-r-*-*- +FontConsolePrefix=-*-arial-*-r-*-*- FontDisplayBaseSize=12 FontDisplayPostfix=-*-*-*-*-*-*-* -FontDisplayPrefix=-*-helvetica-*-r-*-*- +FontDisplayPrefix=-*-arial-*-r-*-*- FontDisplaySmallBaseSize=12 FontMenuBigBaseSize=20 FontMenuBigPostfix=-*-*-*-*-*-*-* -FontMenuBigPrefix=-*-helvetica-*-r-*-*- +FontMenuBigPrefix=-*-arial-*-r-*-*- FontMenuNormalBaseSize=14 FontMenuNormalPostfix=-*-*-*-*-*-*-* -FontMenuNormalPrefix=-*-helvetica-*-r-*-*- +FontMenuNormalPrefix=-*-arial-*-r-*-*- FontMenuVeryBigBaseSize=25 FontSizeAdjustment=0 Lang=english diff --git a/source/glest_game/main/intro.cpp b/source/glest_game/main/intro.cpp index 22a17957..aa727c5c 100644 --- a/source/glest_game/main/intro.cpp +++ b/source/glest_game/main/intro.cpp @@ -524,19 +524,17 @@ void Intro::render() { if(renderX < 0) { const Metrics &metrics= Metrics::getInstance(); int w= metrics.getVirtualW(); - //int h= metrics.getVirtualH(); - - renderX = (w / 2) - (text->getFont()->getMetrics()->getTextWidth(text->getText()) / 2); + renderX = (w / 2); } if(renderY < 0) { const Metrics &metrics= Metrics::getInstance(); int h= metrics.getVirtualH(); - renderY = (h / 2) + (text->getFont()->getMetrics()->getHeight() / 2); + renderY = (h / 2); } renderer.renderText( text->getText(), text->getFont(), alpha, - renderX, renderY, false); + renderX, renderY, true); } }