mirror of https://github.com/OpenTTD/OpenTTD
(svn r15557) -Fix: the font width cache was not updated when changing fonts causing the font spacing to be off when changing fonts in-game (auto font detection).
parent
3ba802e995
commit
85c0276d0e
|
@ -30,6 +30,7 @@
|
||||||
#include "video/video_driver.hpp"
|
#include "video/video_driver.hpp"
|
||||||
#include "engine_base.h"
|
#include "engine_base.h"
|
||||||
#include "strgen/strgen.h"
|
#include "strgen/strgen.h"
|
||||||
|
#include "gfx_func.h"
|
||||||
|
|
||||||
#include "table/strings.h"
|
#include "table/strings.h"
|
||||||
#include "table/control_codes.h"
|
#include "table/control_codes.h"
|
||||||
|
@ -1587,6 +1588,9 @@ void CheckForMissingGlyphsInLoadedLanguagePack()
|
||||||
Utf8Encode(err_str, SCC_YELLOW);
|
Utf8Encode(err_str, SCC_YELLOW);
|
||||||
SetDParamStr(0, err_str);
|
SetDParamStr(0, err_str);
|
||||||
ShowErrorMessage(INVALID_STRING_ID, STR_JUST_RAW_STRING, 0, 0);
|
ShowErrorMessage(INVALID_STRING_ID, STR_JUST_RAW_STRING, 0, 0);
|
||||||
|
|
||||||
|
/* Reset the font width */
|
||||||
|
LoadStringWidthTable();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1595,6 +1599,9 @@ void CheckForMissingGlyphsInLoadedLanguagePack()
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Update the font with cache */
|
||||||
|
LoadStringWidthTable();
|
||||||
|
|
||||||
#if !defined(WITH_ICU)
|
#if !defined(WITH_ICU)
|
||||||
/*
|
/*
|
||||||
* For right-to-left languages we need the ICU library. If
|
* For right-to-left languages we need the ICU library. If
|
||||||
|
|
Loading…
Reference in New Issue