Fix #7266: Reorder reinitialization of caches when changing font zoom level. (#7273)

This commit is contained in:
2019-02-24 16:27:44 +00:00
committed by GitHub
parent 91eee793e1
commit 195fd0dc60
3 changed files with 7 additions and 7 deletions

View File

@@ -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();
}