summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-10-22 20:21:11 +0000
committerrubidium <rubidium@openttd.org>2008-10-22 20:21:11 +0000
commitc7bd7fb221e267e350abe77c137373ea334d53e1 (patch)
tree80fc63b757b0356866d3af38a845407989286d5c /src
parent53235a6c02b36498c218410368b274518181fae4 (diff)
downloadopenttd-c7bd7fb221e267e350abe77c137373ea334d53e1.tar.xz
(svn r14516) -Fix: determine the default text direction based on the language file instead of hardcoding one.
Diffstat (limited to 'src')
-rw-r--r--src/gfx.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gfx.cpp b/src/gfx.cpp
index ead6e5e3a..75189ab6a 100644
--- a/src/gfx.cpp
+++ b/src/gfx.cpp
@@ -291,7 +291,7 @@ static void HandleBiDiAndArabicShapes(char *buffer, const char *lastof)
UBiDi *para = ubidi_openSized((int32_t)length, 0, &err);
if (para == NULL) return;
- ubidi_setPara(para, input_output, (int32_t)length, UBIDI_DEFAULT_RTL, NULL, &err);
+ ubidi_setPara(para, input_output, (int32_t)length, _dynlang.text_dir == TD_RTL ? UBIDI_DEFAULT_RTL : UBIDI_DEFAULT_LTR, NULL, &err);
ubidi_writeReordered(para, intermediate, (int32_t)length, 0, &err);
length = u_shapeArabic(intermediate, (int32_t)length, input_output, lengthof(input_output), U_SHAPE_TEXT_DIRECTION_VISUAL_LTR | U_SHAPE_LETTERS_SHAPE, &err);
ubidi_close(para);