diff --git a/src/guiengine/CGUIFont.cpp b/src/guiengine/CGUIFont.cpp index 5541b6d9d..a55b965df 100644 --- a/src/guiengine/CGUIFont.cpp +++ b/src/guiengine/CGUIFont.cpp @@ -497,7 +497,7 @@ core::dimension2d ScalableFont::getDimension(const wchar_t* text) const thisLine.Width += area.underhang; - if (fallback) thisLine.Width += (area.width + area.overhang)*m_fallback_font_scale + m_fallback_kerning_width; + if (fallback) thisLine.Width += (int)((area.width + area.overhang)*m_fallback_font_scale + m_fallback_kerning_width); else thisLine.Width += area.width + area.overhang + GlobalKerningWidth; } @@ -638,10 +638,11 @@ void ScalableFont::draw(const core::stringw& text, const core::rect& positi positions[sprites[spriteID].Frames[0].rectNumber]); core::dimension2d size = source.getSize(); - size.Width = (int)(size.Width * m_scale); - size.Height = (int)(size.Height * m_scale); - core::rect dest(offsets[n], (fallback[n] ? size*m_fallback_font_scale : size)); - + float scale = fallback[n] ? m_scale*m_fallback_font_scale : m_scale; + size.Width = (int)(size.Width * scale); + size.Height = (int)(size.Height * scale); + core::rect dest(offsets[n], size); + video::SColor colors[] = {color, color, color, color}; video::ITexture* texture = (fallback[n] ?