mirror of https://github.com/OpenTTD/OpenTTD
(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
parent
f6fd21e8e6
commit
2df78944b9
|
@ -481,6 +481,12 @@ Layouter::Layouter(const char *str, int maxw, TextColour colour, FontSize fontsi
|
||||||
} else if (c == SCC_BIGFONT) {
|
} else if (c == SCC_BIGFONT) {
|
||||||
state.SetFontSize(FS_LARGE);
|
state.SetFontSize(FS_LARGE);
|
||||||
} else {
|
} 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);
|
buff += AppendToBuffer(buff, buffer_last, c);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue