# HG changeset patch # User rubidium # Date 1224706871 0 # Node ID ca32d210119d61ddf7247c0f0bb051a6edb0a5bc # Parent d081d791dcee0a01049a47a41e99fcbfa4ffc307 (svn r14516) -Fix: determine the default text direction based on the language file instead of hardcoding one. diff -r d081d791dcee -r ca32d210119d src/gfx.cpp --- a/src/gfx.cpp Wed Oct 22 20:20:08 2008 +0000 +++ b/src/gfx.cpp Wed Oct 22 20:21:11 2008 +0000 @@ -291,7 +291,7 @@ 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);