diff options
| author | ghost <andreas.monzner@multimedia-labs.de> | 2010-05-08 18:42:25 +0200 |
|---|---|---|
| committer | ghost <andreas.monzner@multimedia-labs.de> | 2010-05-08 19:02:22 +0200 |
| commit | aec06d4c574979c24e7ef10c352f7a2d22e79177 (patch) | |
| tree | 26d3e2f2ca8e7d45745721b9df0f771f3ea57ef0 | |
| parent | 7ab186a904a98842266746d2bd3e479bb1cde06e (diff) | |
| download | enigma2-aec06d4c574979c24e7ef10c352f7a2d22e79177.tar.gz enigma2-aec06d4c574979c24e7ef10c352f7a2d22e79177.zip | |
Revert "lib/gdi/font.cpp: try to fix wrong reordering of some characters"
its not working okay.. we need a better fix
This reverts commit 414208c929faa0fc56f9c21c0df572dc0b13d3fe.
| -rw-r--r-- | lib/gdi/font.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/lib/gdi/font.cpp b/lib/gdi/font.cpp index 1d3c34da..2fd9fb69 100644 --- a/lib/gdi/font.cpp +++ b/lib/gdi/font.cpp @@ -597,7 +597,8 @@ int eTextPara::renderString(const char *string, int rflags) // now do the usual logical->visual reordering int size=uc_shape.size(); #ifdef HAVE_FRIBIDI - bool mustRealign=false; + FriBidiCharType dir=FRIBIDI_TYPE_ON; + int lines=1; int pos=0, spos=0; uc_visual.resize(size); // gaaanz lahm, aber anders geht das leider nicht, sorry. @@ -624,25 +625,23 @@ int eTextPara::renderString(const char *string, int rflags) default: break; } - if (line_end || pos+incr >= size) - { + if (line_end || pos+incr >= size) { int len = pos - spos; if (len) - { - FriBidiCharType dir=FRIBIDI_TYPE_ON; fribidi_log2vis(array+spos, len, &dir, target+spos, 0, 0, 0); - if (!mustRealign && dir&FRIBIDI_MASK_RTL) - mustRealign = true; - } target[pos] = array[pos]; if (incr > 1) target[pos+1] = array[pos+1]; spos = pos+incr; + ++lines; line_open = false; } pos += incr; } + if (lines < 2) + fribidi_log2vis(array, size, &dir, target, 0, 0, 0); + uc_visual.assign(target, target+size); #else uc_visual=uc_shape; @@ -741,7 +740,7 @@ nprint: isprintable=0; bboxValid=false; calc_bbox(); #ifdef HAVE_FRIBIDI - if (mustRealign) + if (dir & FRIBIDI_MASK_RTL) realign(dirRight); #endif return 0; |
