(svn r18575) -Fix [FS#3393]: unit numbers weren't always fully shown in the depot

This commit is contained in:
rubidium
2009-12-20 16:42:35 +00:00
parent 9d5a91ed07
commit 3fcccd89fe
3 changed files with 17 additions and 3 deletions

View File

@@ -1306,6 +1306,20 @@ byte GetCharacterWidth(FontSize size, WChar key)
return GetGlyphWidth(size, key);
}
/**
* Return the maximum width of single digit.
* @param size Font of the digit
* @return Width of the digit.
*/
byte GetDigitWidth(FontSize size)
{
byte width = 0;
for (char c = '0'; c <= '9'; c++) {
width = max(GetCharacterWidth(size, c), width);
}
return width;
}
void ScreenSizeChanged()
{