summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2013-11-08 19:13:32 +0000
committerrubidium <rubidium@openttd.org>2013-11-08 19:13:32 +0000
commit2df78944b9f69679262f0c26900887c2124eb7a8 (patch)
treeb3f1f5385b05de46db67f221e7f7c2cb87276226 /src
parentf6fd21e8e668860086b41aec7a939bd7b027f162 (diff)
downloadopenttd-2df78944b9f69679262f0c26900887c2124eb7a8.tar.xz
(svn r25949) -Fix [FS#5683]: text direction forcing characters were not filtered out, but shown as ? when ICU was not used for layouting. These are included in chat and console messages to force them to be displayed right
Diffstat (limited to 'src')
-rw-r--r--src/gfx_layout.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gfx_layout.cpp b/src/gfx_layout.cpp
index eca2d4ba4..d2059788b 100644
--- a/src/gfx_layout.cpp
+++ b/src/gfx_layout.cpp
@@ -481,6 +481,12 @@ Layouter::Layouter(const char *str, int maxw, TextColour colour, FontSize fontsi
} else if (c == SCC_BIGFONT) {
state.SetFontSize(FS_LARGE);
} else {
+#ifndef WITH_ICU
+ /* Filter out text direction characters that shouldn't be drawn, and
+ * will not be handled in the fallback non ICU case because they are
+ * mostly needed for RTL languages which need more ICU support. */
+ if (IsTextDirectionChar(c)) continue;
+#endif
buff += AppendToBuffer(buff, buffer_last, c);
continue;
}