- Fixed: SBarInfo string center alignment didn't work with non-monospace fonts.

SVN r3271 (trunk)
This commit is contained in:
Braden Obrzut 2011-07-14 09:31:39 +00:00
parent dc50487432
commit c8b8cdd13b
1 changed files with 1 additions and 1 deletions

View File

@ -781,7 +781,7 @@ class CommandDrawString : public SBarInfoCommand
break;
case ALIGN_CENTER:
if(script->spacingCharacter == '\0')
x -= static_cast<int> (font->StringWidth(str)+(spacing * str.Len()) / 2);
x -= static_cast<int> ((font->StringWidth(str)+(spacing * str.Len())) / 2);
else
x -= static_cast<int> ((font->GetCharWidth((unsigned char) script->spacingCharacter) + spacing) * str.Len() / 2);
break;