From 3a06962ec8a85843093ac5f874842ecc51f79c0a Mon Sep 17 00:00:00 2001 From: Marianne Gagnon Date: Mon, 5 Jan 2015 20:05:31 -0500 Subject: [PATCH] Don't use the digits font to render text, fixes #1864 --- src/states_screens/race_gui.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/states_screens/race_gui.cpp b/src/states_screens/race_gui.cpp index d681d015b..1784a36bd 100644 --- a/src/states_screens/race_gui.cpp +++ b/src/states_screens/race_gui.cpp @@ -292,6 +292,8 @@ void RaceGUI::drawGlobalTimer() video::SColor time_color = video::SColor(255, 255, 255, 255); int dist_from_right = 10 + m_timer_width; + bool use_digit_font = true; + float elapsed_time = World::getWorld()->getTime(); if (!race_manager->hasTimeTarget()) { @@ -313,6 +315,7 @@ void RaceGUI::drawGlobalTimer() GUIEngine::getFont()->getDimension(_("Challenge Failed")).Width; dist_from_right = 10 + string_width; time_color = video::SColor(255,255,0,0); + use_digit_font = false; } } @@ -325,7 +328,7 @@ void RaceGUI::drawGlobalTimer() pos += core::vector2d(0, UserConfigParams::m_height/2); } - gui::ScalableFont* font = GUIEngine::getHighresDigitFont(); + gui::ScalableFont* font = (use_digit_font ? GUIEngine::getHighresDigitFont() : GUIEngine::getFont()); font->setShadow(video::SColor(255, 128, 0, 0)); font->setScale(1.0f); font->draw(sw.c_str(), pos, time_color, false, false, NULL,