mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2026-07-25 08:22:17 +00:00
This commit is contained in:
+2
-1
@@ -1131,13 +1131,14 @@ TextColour GetContrastColour(uint8 background, uint8 threshold)
|
||||
*/
|
||||
void LoadStringWidthTable(bool monospace)
|
||||
{
|
||||
ClearFontCache();
|
||||
|
||||
for (FontSize fs = monospace ? FS_MONO : FS_BEGIN; fs < (monospace ? FS_END : FS_MONO); fs++) {
|
||||
for (uint i = 0; i != 224; i++) {
|
||||
_stringwidth_table[fs][i] = GetGlyphWidth(fs, i + 32);
|
||||
}
|
||||
}
|
||||
|
||||
ClearFontCache();
|
||||
ReInitAllWindows();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user