summaryrefslogtreecommitdiff
path: root/src/gfx_layout.cpp
diff options
context:
space:
mode:
authorPavel Stupnikov <dp@dpointer.org>2018-04-17 20:41:31 +0300
committerPeterN <peter@fuzzle.org>2018-04-17 18:41:31 +0100
commit9175c349dac23cb236aa981e93bac28a4857c19e (patch)
tree1c29c42f7072c97e0c0e8d21a3c7d9c716b90400 /src/gfx_layout.cpp
parent4d6a5fbec48d0b9967c219c6614566b5a0ef8baa (diff)
downloadopenttd-9175c349dac23cb236aa981e93bac28a4857c19e.tar.xz
Fix #6465: Add {NORMAL_FONT} and {MONO_FONT} control codes to GS strings (#6726)
Diffstat (limited to 'src/gfx_layout.cpp')
-rw-r--r--src/gfx_layout.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/gfx_layout.cpp b/src/gfx_layout.cpp
index f5463d401..de59fc5c8 100644
--- a/src/gfx_layout.cpp
+++ b/src/gfx_layout.cpp
@@ -596,10 +596,8 @@ static inline void GetLayouter(Layouter::LineCacheItem &line, const char *&str,
state.SetColour((TextColour)(c - SCC_BLUE));
} else if (c == SCC_PREVIOUS_COLOUR) { // Revert to the previous colour.
state.SetPreviousColour();
- } else if (c == SCC_TINYFONT) {
- state.SetFontSize(FS_SMALL);
- } else if (c == SCC_BIGFONT) {
- state.SetFontSize(FS_LARGE);
+ } else if (c >= SCC_FIRST_FONT && c <= SCC_LAST_FONT) {
+ state.SetFontSize((FontSize)(c - SCC_FIRST_FONT));
} else {
/* Filter out text direction characters that shouldn't be drawn, and
* will not be handled in the fallback non ICU case because they are