Issue Bug Closed

#20317Right-To-Left text is rendered Left-To-Right in gdlib / graphical menus and text in Typo3

Norbert Bernhardt 04/17/09, 03:27 updated 09/09/13, 10:58

Description

When using right-to-left text (Hebrew, Arabic, Farsi) in a graphical menu, Typo3 and the involved gdlib render this text in a left-to-right manner, eg:
???
becomes
??
?
(something like this).

What we need here is something that brings the letter “back into right order”.

There solution would be to use a log2vis function — Convert a logical string to a visual one — before the text gets rendered by imagettftext.

There are 2 packages available, an PHP PECL package called fribidi:
http://pecl.php.net/package/fribidi
command: $string=fribidi_log2vis($string,FRIBIDI_AUTO,FRIBIDI_CHARSET_UTF8);
or the pure PHP package persian_log2vis:
https://developer.berlios.de/projects/persian-log2vis/
persian-log2vis: persian_log2vis($string);

One of the log2vis commands, or probably both with a function_exists fork, would go right into the first line of
function ImageTTFTextWrapper in
file class.t3lib_stdgraphic.php

While fribidi can deal with other charsets than UTF-8, persian_log2vis cannot.
(issue imported from #M10914)

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.