1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-27 00:19:09 +00:00

Fix: Ignore non-printable characters when layouting a string

This commit is contained in:
glx
2020-02-15 03:08:29 +01:00
committed by Charles Pigott
parent 2f57d65575
commit aa7dbdc42e

View File

@@ -631,6 +631,8 @@ static inline void GetLayouter(Layouter::LineCacheItem &line, const char *&str,
} else if (c >= SCC_FIRST_FONT && c <= SCC_LAST_FONT) {
state.SetFontSize((FontSize)(c - SCC_FIRST_FONT));
} else {
/* Filter out non printable characters */
if (!IsPrintable(c)) continue;
/* 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. */