There is some support for RTL in trunk reportlab. In reportlab/rl_settings there
is a variable called rtlSupport (defaults to 0). If set to 1 using one of the
standard override methods then reportlab attempts to import the fribidi
libraries eg in reportlab/pdfgen/textobject.py
from pyfribidi2 import log2vis, ON as DIR_ON, LTR as DIR_LTR, RTL as DIR_RTL
in the _formatText method we are doing this
def _formatText(self, text):
"Generates PDF text output operator(s)"
if log2vis and self.direction in ('LTR','RTL'):
# Use pyfribidi to write the text in the correct visual order.
text = log2vis(text, directionsMap.get(self.direction.upper(),DIR_ON),clean=True)
if the libraries are not installed or cause an error on import you should get a
warning. I have fixed a bug related to the above so some people are using it.
This low level approach to using fribidi is clearly wrong. We should be doing it
at the parsing level, but that is hard since fribidi doesn't seem to allow for
annotated characters ie carrying the colour font boldness etc etc through a call
to log2vis isn't possible.
--
Robin Becker
.......