aboutsummaryrefslogtreecommitdiff
path: root/lib/gdi/font.cpp
diff options
context:
space:
mode:
authorghost <andreas.monzner@multimedia-labs.de>2010-05-08 18:42:56 +0200
committerghost <andreas.monzner@multimedia-labs.de>2010-05-08 19:02:27 +0200
commit684910d920f90134ade6dd3b944a749336a47029 (patch)
tree485880d7c510ff82fc806f25afb3ae8ec79707a0 /lib/gdi/font.cpp
parentaec06d4c574979c24e7ef10c352f7a2d22e79177 (diff)
downloadenigma2-684910d920f90134ade6dd3b944a749336a47029.tar.gz
enigma2-684910d920f90134ade6dd3b944a749336a47029.zip
Revert "lib/gdi/font.cpp: call libfribidi for single lines on multi line texts to prevent top/bottom reordering"
This reverts commit eea0d8e99edec859a7535966b880b49bd0bba85a. This was not working.. so we revert it
Diffstat (limited to 'lib/gdi/font.cpp')
-rw-r--r--lib/gdi/font.cpp55
1 files changed, 9 insertions, 46 deletions
diff --git a/lib/gdi/font.cpp b/lib/gdi/font.cpp
index 2fd9fb69..dfac144c 100644
--- a/lib/gdi/font.cpp
+++ b/lib/gdi/font.cpp
@@ -595,59 +595,22 @@ int eTextPara::renderString(const char *string, int rflags)
shape(uc_shape, uc_string);
// now do the usual logical->visual reordering
- int size=uc_shape.size();
-#ifdef HAVE_FRIBIDI
+#ifdef HAVE_FRIBIDI
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.
- FriBidiChar array[size], target[size];
- std::copy(uc_shape.begin(), uc_shape.end(), array);
-
- bool line_open = false;
- while(pos < size)
{
- int incr=1;
- bool line_end = false;
- if (!line_open)
- line_open = true;
- switch((unsigned long)array[pos])
- {
- case '\\':
- if (pos+1 == size || (unsigned long)array[pos+1] != 'n')
- break;
- ++incr;
- case 0x8A:
- case 0xE08A:
- case '\n':
- line_end = true;
- default:
- break;
- }
- if (line_end || pos+incr >= size) {
- int len = pos - spos;
- if (len)
- fribidi_log2vis(array+spos, len, &dir, target+spos, 0, 0, 0);
- 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)
+ int size=uc_shape.size();
+ uc_visual.resize(size);
+ // gaaanz lahm, aber anders geht das leider nicht, sorry.
+ FriBidiChar array[size], target[size];
+ std::copy(uc_shape.begin(), uc_shape.end(), array);
fribidi_log2vis(array, size, &dir, target, 0, 0, 0);
-
- uc_visual.assign(target, target+size);
+ uc_visual.assign(target, target+size);
+ }
#else
uc_visual=uc_shape;
#endif
- glyphs.reserve(size);
+ glyphs.reserve(uc_visual.size());
int nextflags = 0;